<template>
  <div class="farmshow">
      <header-model></header-model>
      <y-login></y-login>
      <y-register></y-register>
      <farm-carousel></farm-carousel>
      <back-top></back-top>
      <y-footer></y-footer>
  </div>
</template>

<script>
    import headerModel from '../common/headermodel'
    import YLogin from '../common/login'
    import YRegister from '../common/register'
    import farmCarousel from '../components/farmcarousel'
    import BackTop from '../common/backtop'
    import YFooter from '../common/footer'
    export default {
        components:{
            'header-model':headerModel,
            'y-login':YLogin,
            'y-register':YRegister,
            'farm-carousel':farmCarousel,
            'back-top':BackTop,
            'y-footer':YFooter
        },
        mounted(){
            $('.nav-list ul li:nth-of-type(4) a').css('background','#48A864')
            $('.login').on('click',function(){
               $('.login-box').show()
           });
           $('.y-login .bgColor').on('click',function(){
              $('.register-box').show()
              $('.y-login').hide()
           });
           $('.y-register .bgColor').on('click',function(){
              $('.register-box').hide()
              $('.y-login').show()
           });
           $('.cancel').on('click',function(){
               $('.login-box').hide()
               $('.register-box').hide()
           })
           $('.skip').on('click',function(){
               $('.register-box').show()
              $('.y-login').hide()
           })
       }
    }
</script>

<style scoped>
    *{
    margin: 0;
    padding: 0;
    min-width: 1200px;
    }
    .farmshow{
        font-family:'Helvetica Neue', 'Helvetica', 'STHeitiSC-Light', "Hiragino Sans GB",Arial,"Microsoft YaHei", "微软雅黑", "STHeiti", "WenQuanYi Micro Hei",'PingFang SC', SimSun, sans-serif;
        border:5px solid #f0f0f0;
        border-radius:3px;   
    }
</style>
